package com.hopes.bizz.risk.control.vo;

import com.hopes.bizz.risk.common.constant.enums.RiskModDictEnum;
import com.hopes.bizz.risk.control.entity.RiskControlMeasureEntity;
import com.hopes.boss.admin.api.resolver.DictResolver;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author yumr
 * @time 2023/7/19 17:51
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "风险管控措施VO")
public class RiskControlMeasureVO extends RiskControlMeasureEntity {

    private static final long serialVersionUID = -2514435548571010179L;

    /* 风险对象 */
    private Long riskObjectId;

    // 合并多少行
    private int rowCount;

    private int objectRowCount;

    private int unitRowCount;

    private int eventRowCount;

    /* 风险分析对象 */
    private RiskObjectVO riskObject;

    /* 风险事件 */
    private RiskUnitEventVO riskUnitEvent;

    /* 任务配置 */
    private List<RiskMeasureTaskConfigVO> riskMeasureTaskConfigList;

    /* 风险对象 */
    public String getRiskObjectIdStr() {
        return DictResolver.getItemLabelByValue(RiskModDictEnum.risk_object, this.getRiskObjectId());
    }

}
